package com.kitty.game.fight.pet;

import com.kitty.game.fight.bean.Fight;
import com.kitty.game.fight.bean.FightObject;
import com.kitty.game.fight.util.FightRateUtil;
import com.kitty.game.fight.pet.PetSkillProcessor;

/**
 * 神圣之光
 * 可以使敌方人员的特殊状态消失（乾坤罩、神龙罩、如意圈等，对障碍性法术所带来的效果无效）
 */
public class SheShengZhiGuangProcessor extends PetSkillProcessor {

    @Override
    public void trigger(Fight fight, FightObject effector, FightObject target, int skillLevel, Object... args) {
        if (effector.isFallDown()) {
            return;
        }
        if (!fight.isSameSide(effector, target)) {
            return;
        }
        if (!FightRateUtil.isPetSkillHit(effector, target)) {
            return;
        }
        // 清除所有的辅助技能
        target.clearAssistBuff();
    }


    @Override
    public Boolean effect(Fight fight, FightObject effector, FightObject target, Object... args) {
        return Boolean.TRUE;
    }

}
